﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Eassets.Data.Global;
using Eassets.Layered.Domain.Global;
using System.Collections.ObjectModel;

namespace Eassets.Service.Global
{
    public class WorkFlowDocumentService
    {
        WorkFlowDocumentData workFlowDocumentdata = new WorkFlowDocumentData();

        /// <summary>
        /// Inserts workFlowDocument.
        /// </summary>
        /// <param name="workFlowDocument"></param>
        public void AddWorkFlowDocument(WorkFlowDocument workFlowDocument)
        {
            if (workFlowDocument != null)
            {
                workFlowDocumentdata.AddWorkFlowDocument(workFlowDocument);
            }
        }

        /// <summary>
        /// Updates workFlowDocument.
        /// </summary>
        /// <param name="workFlowDocument"></param>
        public void ModifyWorkFlowDocument(WorkFlowDocument workFlowDocument)
        {
            if (workFlowDocument != null)
            {
                workFlowDocumentdata.ModifyWorkFlowDocument(workFlowDocument);
            }
        }

        /// <summary>
        /// Delete workFlowDocument.
        /// </summary>
        /// <param name="workFlowDocumentId"></param>
        public void DeleteWorkFlowDocument(long workFlowDocumentId)
        {
            if (workFlowDocumentId != 0)
            {
                workFlowDocumentdata.DeleteWorkFlowDocument(workFlowDocumentId);
            }
        }

        /// <summary>
        /// GetbyId workFlowDocument.
        /// </summary>
        /// <param name="workFlowDocumentId"></param>
        /// <returns></returns>
        public WorkFlowDocument GetByIdWorkFlowDocument(long workFlowDocumentId)
        {
            return workFlowDocumentdata.GetByIdWorkFlowDocument(workFlowDocumentId);
        }

        /// <summary>
        /// GetAll workFlowDocument.
        /// </summary>
        /// <returns></returns>
        public Collection<WorkFlowDocument> GetAllWorkFlowDocument()
        {
            return workFlowDocumentdata.GetAllWorkFlowDocument();
        }
    }
}
